using System.Collections;

using LocalBoard.Domain;

namespace LocalBoard.Persistence
{
	/// <summary>
	/// Summary description for IMessageAccessor.
	/// </summary>
	public interface IMessageAccessor
	{
		ArrayList GetMessageListByBoardId(int boardId, int numberPerPage, int pageNo);
		ArrayList GetMessageListByClubId(int clubId, int numberPerPage, int pageNo);
		Message Get(int id);
		ArrayList GetReplies(int id);
		int GetTotalRootMessageCountByBoardId(int boardId);
		int GetTotalRootMessageCountByClubId(int clubId);
		int Insert(Message message);
		void Update(Message message);
		void Delete(int id);
		/// <summary>
		/// Insert a vote for a message
		/// </summary>
		/// <param name="id">Message id</param>
		/// <param name="profileId">Profile Id</param>
		/// <param name="point">Give a point to a message</param>
		void InsertVote(int id, int profileId, int point);
		/// <summary>
		/// Get list of votes that users casted for a message
		/// </summary>
		/// <param name="id">Message id</param>
		/// <returns>List of <see cref="Vote">Vote</see>s</returns>
		ArrayList GetVoteList(int id);

		void IncreaseHit(Message message);
	}
}
